import numpy as np
# import matplotlib.pyplot as plt
# SIS模型

nowConfirmAdd = [0.01646728612334054, 0.016195660785223585, 0.015788222778048148, 0.015278925269078852, 0.014928075874011116, 0.01443009608746336, 0.013864209966386366, 0.013422818791946308, 0.012958792172663174, 0.012438176941272338, 0.012494765553380038, 0.012936156727820095, 0.013071969396878573, 0.01324173523320167, 0.01329832384530937, 0.013026698507192415, 0.01337754790226015, 0.013762350464592506, 0.013898163133650984, 0.014305601140826421, 0.014396142920198739, 0.01450932014441414, 0.014995982208540353, 0.01552791516235273, 0.015629774664146587, 0.016444650678497458, 0.01749719886370067, 0.018877960999128536, 0.020111592743076386, 0.0205982548072026]
healRate = [0.014486684699571059, 0.015154430322441913, 0.015912717724685086, 0.016320155731860523, 0.01676154690630058, 0.01736138619464219, 0.017859365981189947, 0.01844788754711002, 0.0186402888282762, 0.018934549611236237, 0.019104315447559334, 0.019104315447559334, 0.019228810394196272, 0.019341987618411674, 0.019647566123793248, 0.019749425625587107, 0.01969283701347941, 0.01971547245832249, 0.019647566123793248, 0.019658883846214788, 0.019466482565048612, 0.01948911800989169, 0.019081680002716254, 0.01870819516280544, 0.01834602804531616, 0.018198897653836144, 0.017712235589709927, 0.017146349468632933, 0.01684077096325136, 0.01675022918387904]
# 中国总人口
N = 1.40005e9
# 要预测的天数30天+当前一天=31天
T = 31
# 当前情况下病毒传播速度，计算方法：30天内的平均每天新增数 / 平均确诊数
lamda = 0
# 当前情况下治愈的速度，计算方法：30天内的平均每天治愈数 / 平均确证数
gamma = 0
# 30天后的确诊数统计
i = np.zeros([T])
# initial infective people
i[0] = 4089.0 / N

for t in range(T-1):
    lamda = nowConfirmAdd[t]
    gamma = healRate[t]
    i[t + 1] = i[t] + i[t] * lamda * (1.0 - i[t]) - gamma*i[t]
np.set_printoptions(suppress=True)
print(np.around(i * N,0))